<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.TopicsControl"
    CodeBehind="Topics.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-content.png" alt="Topics" />
        Manage Topics
    </div>
    <div class="options">
        <input type="button" onclick="location.href='TopicAdd.aspx'" value="Add new" id="btnAddNew"
            class="adminButtonBlue" title="Add a new topic" />
    </div>
</div>
<table>
    <tr>
        <td class="adminTitle">
            <nopCommerce:ToolTipLabel runat="server" ID="lblLanguage" Text="Select language:"
                ToolTip="Select a language for the topic. A topic can be created for each language that your store supports."
                ToolTipImage="~/Administration/Common/ico-help.gif" />
        </td>
        <td class="adminData">
            <asp:DropDownList ID="ddlLanguage" AutoPostBack="True" OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged"
                CssClass="adminInput" runat="server">
            </asp:DropDownList>
        </td>
    </tr>
</table>
<p>
</p>
<asp:GridView ID="gvTopics" runat="server" AutoGenerateColumns="False" Width="100%">
    <Columns>
        <asp:BoundField DataField="TopicID" HeaderText="TopicID" Visible="False"></asp:BoundField>
        <asp:TemplateField HeaderText="Name" ItemStyle-Width="40%">
            <ItemTemplate>
                <%#Eval("Name")%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Edit (info)" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="TopicDetails.aspx?TopicID=<%#Eval("TopicID")%>" title="Edit topic info">Edit
                    topic info</a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Edit (content)" HeaderStyle-HorizontalAlign="Center"
            ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <a href="TopicLocalizedDetails.aspx?TopicID=<%#Eval("TopicID")%>&LanguageID=<%#GetSelectedLanguageID()%>"
                    title="Edit topic content">Edit topic content</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
